# Generating tasks using the CLI

Before you can generate a task, you must first run the `Connect` command as described in [Connecting to Qlik Compose server](https://help.qlik.com/en-US/compose/December2024/Content/ComposeDWDL/Main/DW/Projects/connect_to_compose_server.htm).

Information note

As Compose CLI requires Administrator permission, make sure to select "Run as administrator" when opening the command prompt.

Use the `generate_tasks` command to generate tasks at project, task, data warehouse, and data mart level.

When this command succeeds, it returns `0`.

## Command syntax

`ComposeCli.exe generate_tasks --project [project-name] --type [DW|DM] --task [task-name] --timeout --skip_external_checks
`

## Parameters

| Parameter | Description |
| --- | --- |
| --project | The name of the project. |
| --type | The type of tasks to generate. Specify DW to generate data warehouse tasks or DM to generate data mart tasks. If omitted, all tasks will be<br>generated, unless the "task" and/or "project" parameters are included in the command. |
| --task | The name of the task to generate. If omitted, all tasks will be generated, unless the "project" and/or "type" parameters are included in the<br>command. |

## Example

` ComposeCli.exe generate_tasks --project myproject --type DW --task mytask --timeout --skip_external_checks
                 `